/*
 * @Description: 自定义主进程方法文件
 * @Date: 2024-10-15 10:51:56
 * @FilePath: \demod:\12electron\electron-vite-template\src\main\ipcMain.ts
 */

import { app, ipcMain, Menu, MenuItemConstructorOptions } from 'electron';

ipcMain.on('rightBtnClick', () => {
  const template = [
    {
      label: '退出',
      click: () => {
        app.quit();
      },
    },
  ] as MenuItemConstructorOptions[];

  const menu = Menu.buildFromTemplate(template);
  menu.popup();
});
